const { query } = require('./config/database')

async function checkTableStructure () {
  try {
    console.log('🔍 检查用户表结构...')

    // 查看表结构
    const tableStructure = await query('DESCRIBE users')
    console.log('用户表结构:')
    console.table(tableStructure)

    // 查看所有用户
    const allUsers = await query('SELECT * FROM users')
    console.log('\n📋 所有用户:')
    console.table(allUsers)
  } catch (error) {
    console.error('❌ 检查失败:', error)
  }

  process.exit(0)
}

checkTableStructure()
